import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  base: process.env.BASE_URL,
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    {
      path: '/index',
      redirect:"/proList",
      name: 'index',
      component: () => import("./views/Index.vue"),
      children: [
        {
          path: '/proList',
          name: 'proList',
          component: () => import("./views/proList.vue"),
        },
        {
          path: '/userList',
          name: 'userList',
          component: () => import("./views/userList"),
        },
        {
          path: '/order',
          name: 'order',
          component: () => import("./views/Order"),
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import("./views/Login"),
    },

  ]
})
